package com.zzptc.syl.traffic;

import android.content.Context;
import android.content.SharedPreferences;

public class SharePreUtil {
    private static SharedPreferences sp;
    public static void saveBoolean(Context ctx,String key,boolean value){
        if (sp == null){
            sp = ctx.getSharedPreferences("cofing", Context.MODE_PRIVATE);
        }
        sp.edit().putBoolean(key,value).commit();
    }
    public static Boolean getBoolean(Context ctx,String key,boolean defValue){
        if (sp == null){
            sp = ctx.getSharedPreferences("cofing",Context.MODE_PRIVATE);
        }
        return sp.getBoolean(key,defValue);
    }
}
